<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <style>
        .one {
            width: 5px;
            margin: 0 auto;
            line-height: 30px;
            font-size: 10px;
            background-color: #ffffff;
            border: none;
        }

        body {
            font-family: SimHei;
        }
    </style>
</head>
<body>
<#escape x as x?html>
    <div>
        <#assign count1=0 />
        <#assign count2=0 />
        <#assign count3=0 />
        <#assign size=13>
        <#if lines?exists>
            <#assign page=(lines?size/size)?ceiling>
            <#list 1..page as c>
                <div <#if c !=page>style="page-break-after:always;"
                        </#if>>
                    <table width="100%" border="0" cellspacing="0" cellpadding="3" style="font-size:14px;">
                        <tbody>
                        <tr>
                            <td colspan="4" style="width: 100% ;text-align: center">
                                <h2 style="display: inline">记账凭证</h2>
                            </td>
                        </tr>
                        <tr>
                 			<td width="35%" height="40">组织:<#if setNo?length gt 8>${setNo?substring(0,8)}<#else>${setNo}</#if></td>
							<td width="15%" height="40">币种:${standardCurrency!" "}</td>
							<td width="25%" height="40">来源:${custom.jesource!" "}</td>
							<td width="25%" height="40">编号:${voucherNo!" "}</td>
                        </tr>
                        <tr>
                            <td width="35%" height="45">名称:${custom.headername!" "}</td>
                            <td width="15%">本位币:${standardCurrency!" "}</td>
                            <td width="25%">类型:${voucherType!" "}</td> 
                            <td width="25%">期间:${voucherPeriod!}</td>
                        </tr>
                        </tbody>
                    </table>
                    <#if c*size gt lines?size>
                        <#assign end=lines?size-1 />
                    <#else>
                        <#assign end=c*size-1 />
                    </#if>
                    <div width="100%">
                        <table width="100%" border="1" cellspacing="0" cellpadding="0" 
                               style="font-size: 12px;text-align: center;">
                            <thead style="background-color: #DBE4F0;">
                            <tr>
                                <td width="30%" height="40">摘要</td>
                                <td width="30%" height="40">会计科目</td>
                                <td width="10%" height="40">原币金额</td>
                                <td width="15%" height="40">借方金额</td>
                                <td width="15%" height="40">贷方金额</td>
                            </tr>
                            </thead>
                            <tbody>
                            <#list (c-1) * size..end as i>
                                <#assign line=lines[i] />
                                <tr>
                                    <td height="60">${line.voucherAbstract!" "}</td>
                                    <td>${line.custom.accountdesc!" "}</td>
                                    <td>${line.originalAmount!" "}</td>
                                    <td>${line.debitAmount!" "}</td>
                                    <td>${line.creditAmount!" "}</td>
                                </tr>
                                <#assign count1=count1+line.creditAmount />
                                <#assign count2=count2+line.debitAmount />
                            </#list>
                            </tbody>
                        </table>
                    </div>
					 
					<div <#if c !=page>style="page-break-after:always;"
                        </#if>>
                    <table width="100%" border="0" cellspacing="0" cellpadding="3" style="font-size:14px;">
                        <tbody>
                        <tr>
                            <td colspan="0" style="width: 100% ;text-align: right">
                                页码:&nbsp;&nbsp;${c}/${page}
                            </td>
						</tr>
                        </tbody>
                    </table>
					</div>	 
			
                </div>
            </#list>
            <div style="">
                <table border="0" cellspacing="0" cellpadding="5" width="100%" style="font-size: 14px;word-break:keep-all;table-layout:fixed;">
                    <tbody>
                    <tr>
                        <td colspan="2" height="50">全部合计借方:&nbsp;&nbsp;${total!" "}</td>
                        <td colspan="2">全部合计贷方:&nbsp;&nbsp;${total!" "}</td>
                    </tr>
                    <tr>
                        <td height="50">制单人:&nbsp;&nbsp;${preparedBy!" "}</td>
                        <td>审批人:&nbsp;&nbsp;${approvedBy!" "}</td>
                        <td>经办人:&nbsp;&nbsp;${operator!" "}</td>
                        <td>审核人:&nbsp;&nbsp;${reviewer!" "}</td>
                    </tr>
                  </tbody>
                </table>
            </div>
		</#if>
    </div>
</#escape>
</body>
</html>
